const db = require("../lib/db");
function addArticle(article_id,title,desc,author,authorId,classify,content){
    return new Promise((resolve,reject)=>{
        let sql = `insert into article(_id,title,article_desc,author,authorId,classify,content)values('${article_id}','${title}','${desc}','${author}','${authorId}','${classify}','${content}')`;
        
        db.querySql(sql).then(data=>{
            if(data.length==0){
                resolve(405)
            }else{
                resolve(406)
            }
        })
    })
}
module.exports=addArticle